window.loginCallback = function() {
	//登陆完成，获取AuthorizeCode
	$.ajax({
		"url": window.eu.url,
		"type": "POST",
		"dataType": "json",
		"data": {
			"client_id": window.eu.client_id
		},
		"success": function(response) {
			if (response.success == 1) {
				//建立URL
				var url = window.eu.redirect_uri.replace('\\', '');
				if (url.indexOf('?') >= 0) {
					url += '&';
				} else {
					url += '?';
				}
				url += 'code=' + response.AuthorizeCode;
				if (window.eu.state !== '') {
					url += '&state=' + encodeURIComponent(window.eu.state);
				}
				window.location.href = url;
			}
		},
		"error": function() {
			window.loginCallback();
		}
	});
};